import request from '@/utils/request'

// 查询值班信息列表
export function currentShif(query) {
  return request({
    url: '/system/shift/current',
    method: 'get',
    params: query
  })
}

// 查询值班信息列表
export function listShift(query) {
  return request({
    url: '/system/shift/list',
    method: 'get',
    params: query
  })
}

// 查询值班信息详细
export function getShift(currentShift) {
  return request({
    url: '/system/shift/' + currentShift,
    method: 'get'
  })
}

// 新增值班信息
export function addShift(data) {
  return request({
    url: '/system/shift',
    method: 'post',
    data: data
  })
}

// 修改值班信息
export function updateShift(data) {
  return request({
    url: '/system/shift',
    method: 'put',
    data: data
  })
}

// 删除值班信息
export function delShift(currentShift) {
  return request({
    url: '/system/shift/' + currentShift,
    method: 'delete'
  })
}
